package com.demo.pagers;

import com.demo.Finder;
import org.openqa.selenium.WebElement;

/**
 * Created by Administrator on 2017/7/7.
 */
public class PageMy {

    private Finder finder;


    public PageMy(Finder finder){
        this.finder = finder;
    }

    public WebElement getLoginIcon(){
        return finder.findById("com.netease.newsreader.activity:id/a4h",0);
    }

    public void clickLoginIcon(){
        finder.click(getLoginIcon());
    }

    public WebElement getNickName(){
        return finder.findById("com.netease.newsreader.activity:id/api");
    }

    public String getNickNameText(){
        return finder.getWebElementText(getNickName());
    }

}
